#import "YearningTonicController.h"
        
#import "YearningTonicModel.h"
#import "YearningTonicCell.h"
#import "Masonry.h"

@interface YearningTonicController () <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UITableView *luminarySolarTableView;
@property (nonatomic, strong) NSMutableArray *unfoldKeepsakeDatas;

@end

@implementation YearningTonicController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self zipperConfigsui];
	[self pulseMelancholyloadData];
}


- (void)zipperConfigsui {
    self.luminarySolarTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
    self.luminarySolarTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
    self.luminarySolarTableView.estimatedRowHeight = 0;
    self.luminarySolarTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    self.luminarySolarTableView.contentInset = UIEdgeInsetsMake(16, 0, 16, 0);
    self.luminarySolarTableView.delegate = self;
    self.luminarySolarTableView.dataSource = self;
	self.luminarySolarTableView.rowHeight = 92;
    self.luminarySolarTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
    self.luminarySolarTableView.showsVerticalScrollIndicator = NO;
    self.luminarySolarTableView.showsHorizontalScrollIndicator = NO;
    self.luminarySolarTableView.backgroundColor = UIColor.clearColor;
    [self.luminarySolarTableView registerClass:[YearningTonicCell class] forCellReuseIdentifier:NSStringFromClass([YearningTonicCell class])];
    [self.view addSubview:self.luminarySolarTableView];
    [self.luminarySolarTableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.trailing.equalTo(self.view);
        make.top.equalTo(self.view);
        make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
    }];
}

//: 获取数据模型
- (void)pulseMelancholyloadData {
	
}

//: 懒加载数据模型数组
- (NSMutableArray *)unfoldKeepsakeDatas {
	if (!_unfoldKeepsakeDatas) {
		_unfoldKeepsakeDatas = [NSMutableArray array];
	}
	return _unfoldKeepsakeDatas;
}

#pragma mark - UITableView DataSource 
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.unfoldKeepsakeDatas.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    YearningTonicCell *yonder = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([YearningTonicCell class])];
    if (yonder == nil) {
        yonder = [[YearningTonicCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:NSStringFromClass([YearningTonicCell class])];
    }
    yonder.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return yonder;
}


#pragma mark - UITableView Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // cell tap action
}


@end
